@extends('layouts.back')
@section('title','watermelon')
@section('keyword', 'watermelonBlog')
@section('description', 'watermelonBlog')
@section('content')
    <div class="water_admin_content">
        <form action="/store" method="post">
            <div class="water_admin_content_title">
                <label for="title">标题</label>
                <input type="text" name="title" id="title" value="{{$postDetail->title}}">
            </div>
            <div class="water_admin_cate">
                <label for="cate">分类</label>
                <select name="category" id="">
                    <option value="">请选择文章分类</option>
                    @foreach($category as $item)
                        <option value="{{$item->id}}">{{$item->name}}</option>
                    @endforeach
                </select>
            </div>
            <div class="water_admin_content_tag">
                <label for="tags">标签</label>
                <input type="text" name="tag" id="tags" value="@foreach($postDetail->tags as $item){{$item->name.'  '}}@endforeach">
            </div>
            <div class="water_admin_content_summary">
                <label for="summary">摘要</label>
                <textarea name="summary" id="summary" cols="30" rows="5">{{$postDetail->summary}}</textarea>
            </div>
            <div class="water_admin_main_content">
                <label for="content">内容</label>
                <div id="content" style="min-height: 300px;">
                    {!! $postDetail->content !!}
                </div>
            </div>
            <button type="submit" class="storeArticle">保存</button>
        </form>
    </div>
@endsection
